#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import allure
import pytest
from utils import dt

@pytest.fixture(autouse=True)
def set_feature(naviBar,stockTrackPage,stockSearchPage,pre_login):
    allure.dynamic.story('股票搜索')
    pre_login()
    naviBar.stockTrackButton.click()
    stockTrackPage.searchButton.click()
    if not dt.is_trading_day():
        stockSearchPage.searchAlert.should().be_in_viewport().should().disappear()
        stockSearchPage.searchInput.should().not_be_enabled()
        # 选择倒数第三个交易日
        stockSearchPage.pick_date_by_index(-3)

